import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [

  {
    path: '/home',
    name: 'home',
    component: HomeView
  },
  {
    path: '/',
    name: 'login',
    component: () => import('../views/Login.vue')
  }, ,

  {
    path: '/',
    name: 'about',
    component: () => import('../views/AboutView.vue'),
  },

  {
    path: '/about',
    name: 'about',
    component: () => import('../views/AboutView.vue'),
    children: [
      {
        path: '',
        name: 'Hom',
        component: () => import('../components/sec-router/home.vue'),
      },
      {
        path: 'hom',
        name: 'Hom',
        component: () => import('../components/sec-router/home.vue'),
      },
      {
        path: 'set',
        name: 'Set',
        component: () => import('../components/sec-router/set.vue'),
      },
      {
        path: 'txt',
        name: 'Txt',
        component: () => import('../components/sec-router/txt.vue'),
      }
      ,
      {
        path: 'user',
        name: 'User',
        component: () => import('../components/sec-router/users.vue'),
      }
      ,
      {
        path: 'eachat',
        name: 'eachat',
        component: () => import('../components/sec-router/eachat.vue'),
      }

    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
